package com.neusoft.cebc.base.function.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.cebc.base.dao.SysUserDao;
import com.neusoft.cebc.base.entity.SysUser;
import com.neusoft.cebc.base.function.UserService;

@Service
public class UserServiceImpl implements UserService{
	
	@Autowired
	private SysUserDao userDao;

	@Override
	public SysUser login(String account, String password) throws Exception {
		SysUser user = userDao.selectByAccount(account);
		if(user == null) {
			return null;
		}else {
			if(!user.getPassword().equals(password)) {
				return null;
			}
		}
		return user;
	}
	
	
}
